<?php
	require_once "../Controle/Config.php";
	require_once "../Controle/Util.php";
	require_once "../Controle/ControleSessao.php";
	require_once "../Controle/ControleRoteiro.php";
	
	$LstRoteiro = new ControleRoteiro();
	$LstRoteiro->listar("where idroteiro=".$_GET['idroteiro']."",false);
	
	$idroteiro = $LstRoteiro->cmp[0]['idroteiro'];
	$chamada = utf8_encode($LstRoteiro->saidaDedados($LstRoteiro->cmp[0]['chamada']));
	$roteiro = utf8_encode($LstRoteiro->saidaDedados($LstRoteiro->cmp[0]['roteiro']));
	$valor = utf8_encode($LstRoteiro->saidaDedados($LstRoteiro->cmp[0]['valor']));
	$servicos = utf8_encode($LstRoteiro->saidaDedados($LstRoteiro->cmp[0]['servicos']));
	$posicao = utf8_encode($LstRoteiro->saidaDedados($LstRoteiro->cmp[0]['posicao']));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<meta name="author" content="Paulo Rios">
	<!--link href="../css/global.css" rel="stylesheet" type="text/css" /-->
	<title>Untitled 7</title>
</head>

<body>
<div style="padding:10px;width:560;">
	<div class="tituloPop">Adicionar Novo Roteiro</div>
	<div class="alerta" id="DivAlerta"></div>
	<!-- conteudo -->
	<div style="border:solid 1px #cccccc; background-color:#f7f7f7; padding:5px;">
		<span style="color:red;"><b>Importante!</b></span><br>
		Exemplo de <b>negrito</b> --> Exemplo de [b]negrito[/b]
	</div>
	<form name="FormRoteiroEdt" id="FormRoteiroEdt" action="../Controle/ControleRoteiro.php?Exec=EdtRoteiro&<?=mt_rand(1,2500);?>" method="post" enctype="multipart/form-data" >
		<input type="hidden" name="idroteiro" value="<?=$idroteiro;?>" />
		<table width="560">
			<tr>
				<td>Chamada</td>
			</tr>
			<tr>
				<td><textarea name="chamada" rows="3" class="textareapadraosemfoco" onfocus="this.className='textareapadraocomfoco'" onblur="this.className='textareapadraosemfoco'" style="width:100%;"><?=$chamada;?></textarea></td>
			</tr>
			<tr>
				<td>Roteiro</td>
			</tr>
			<tr>
				<td><textarea name="roteiro" rows="20" class="textareapadraosemfoco" onfocus="this.className='textareapadraocomfoco'" onblur="this.className='textareapadraosemfoco'" style="width:100%;"><?=$roteiro;?></textarea></td>
			</tr>
			<tr>
				<td>Valor</td>
			</tr>
			<tr>
				<td><textarea name="valor" rows="5" class="textareapadraosemfoco" onfocus="this.className='textareapadraocomfoco'" onblur="this.className='textareapadraosemfoco'" style="width:100%;"><?=$valor;?></textarea></td>
			</tr>
			<tr>
				<td>Servi&ccedil;os</td>
			</tr>
			<tr>
				<td><textarea name="servicos" rows="7" class="textareapadraosemfoco" onfocus="this.className='textareapadraocomfoco'" onblur="this.className='textareapadraosemfoco'" style="width:100%;"><?=$servicos;?></textarea></td>
			</tr>
			<tr>
				<td>Arquivo</td>
			</tr>
			<tr>
				<td>
					<input type="radio" name="manip" value="manter" checked> Manter
					<input type="radio" name="manip" value="substituir"> Substiruir<br>
					<input type="file" name="arquivo" class="file" /></td>
			</tr>
				<td>Ordem</td>
			</tr>
			<tr>
				<td>
					<select name="posicao">
					<?php
					
					if($posicao == '1'){
						echo "<option value=1 selected>1</option>";
					}else{
						echo "<option value=1>1</option>";
					}
					if($posicao == '2'){
						echo "<option value=2 selected>2</option>";
					}else{
						echo "<option value=2>2</option>";
					}
										if($posicao == '3'){
						echo "<option value=3 selected>3</option>";
					}else{
						echo "<option value=3>3</option>";
					}
					if($posicao == '4'){
						echo "<option value=4 selected>4</option>";
					}else{
						echo "<option value=4>4</option>";
					}
										if($posicao == '5'){
						echo "<option value=5 selected>5</option>";
					}else{
						echo "<option value=5>5</option>";
					}
					if($posicao == '6'){
						echo "<option value=6 selected>6</option>";
					}else{
						echo "<option value=6>6</option>";
					}
										if($posicao == '7'){
						echo "<option value=7 selected>7</option>";
					}else{
						echo "<option value=7>7</option>";
					}
					if($posicao == '8'){
						echo "<option value=8 selected>8</option>";
					}else{
						echo "<option value=8>8</option>";
					}
										if($posicao == '9'){
						echo "<option value=9 selected>9</option>";
					}else{
						echo "<option value=9>9</option>";
					}
					if($posicao == '10'){
						echo "<option value=10 selected>10</option>";
					}else{
						echo "<option value=10>10</option>";
					}
										if($posicao == '11'){
						echo "<option value=11 selected>11</option>";
					}else{
						echo "<option value=11>11</option>";
					}
					if($posicao == '12'){
						echo "<option value=12 selected>12</option>";
					}else{
						echo "<option value=12>12</option>";
					}
										if($posicao == '13'){
						echo "<option value=13 selected>13</option>";
					}else{
						echo "<option value=13>13</option>";
					}
					if($posicao == '14'){
						echo "<option value=14 selected>14</option>";
					}else{
						echo "<option value=14>14</option>";
					}
										if($posicao == '15'){
						echo "<option value=15 selected>15</option>";
					}else{
						echo "<option value=15>15</option>";
					}
					if($posicao == '16'){
						echo "<option value=16 selected>16</option>";
					}else{
						echo "<option value=16>16</option>";
					}
										if($posicao == '17'){
						echo "<option value=17 selected>17</option>";
					}else{
						echo "<option value=17>17</option>";
					}
					if($posicao == '18'){
						echo "<option value=18 selected>18</option>";
					}else{
						echo "<option value=18>18</option>";
					}
										if($posicao == '19'){
						echo "<option value=19 selected>19</option>";
					}else{
						echo "<option value=19>19</option>";
					}
					if($posicao == '20'){
						echo "<option value=20 selected>20</option>";
					}else{
						echo "<option value=20>20</option>";
					}
										if($posicao == '21'){
						echo "<option value=21 selected>21</option>";
					}else{
						echo "<option value=21>21</option>";
					}
					if($posicao == '22'){
						echo "<option value=22 selected>22</option>";
					}else{
						echo "<option value=22>22</option>";
					}
										if($posicao == '23'){
						echo "<option value=23 selected>23</option>";
					}else{
						echo "<option value=23>23</option>";
					}
					if($posicao == '24'){
						echo "<option value=24 selected>24</option>";
					}else{
						echo "<option value=24>24</option>";
					}
										if($posicao == '25'){
						echo "<option value=25 selected>25</option>";
					}else{
						echo "<option value=25>25</option>";
					}
					if($posicao == '26'){
						echo "<option value=26 selected>26</option>";
					}else{
						echo "<option value=26>26</option>";
					}
										if($posicao == '27'){
						echo "<option value=27 selected>27</option>";
					}else{
						echo "<option value=27>27</option>";
					}
					if($posicao == '28'){
						echo "<option value=28 selected>28</option>";
					}else{
						echo "<option value=28>28</option>";
					}
										if($posicao == '29'){
						echo "<option value=29 selected>29</option>";
					}else{
						echo "<option value=29>29</option>";
					}
					if($posicao == '30'){
						echo "<option value=30 selected>30</option>";
					}else{
						echo "<option value=30>30</option>";
					}	
					?>
					</select>
				</td>
			</tr>
			<tr>			
			<tr>
				<td><input type="submit" class="btsubmit" value="CONFIRMA" /></td>
			</tr>
		</table>
	</form>
	<!-- fim do conteudo -->

</div>
<script>
	setTimeout("foco('nome')",500);
</script>
</body>
</html>